<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>登录页面</title>
    <style>
        body {
            font-family: Arial, sans-serif;
            display: flex;
            justify-content: center;
            align-items: center;
            height: 100vh;
            margin: 0;
            background-color: #f0f0f0;
        }

        .login-container {
            width: 300px;
            padding: 20px;
            background-color: white;
            border-radius: 5px;
            box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
        }

        .form-group {
            margin-bottom: 20px;
        }

        input[type="text"], input[type="password"], input[type="tel"] {
            width: 100%;
            padding: 10px;
            border: 1px solid #ccc;
            border-radius: 3px;
            outline: none;
        }

        button {
            width: 100%;
            padding: 10px;
            background-color: #007BFF;
            color: white;
            border: none;
            border-radius: 3px;
            cursor: pointer;
        }
    </style>
</head>
<body>
    <div class="login-container">
        <h3>登录</h3>
        <form action="">
            <div class="form-group">
                <label for="username">手机号</label>
                <input type="tel" id="username" pattern="[0-9]{11}" required>
            </div>
            <div class="form-group">
                <label for="password">密码</label>
                <input type="password" id="password" required>
            </div>
            <div class="form-group">
                <label for="captcha">验证码</label>
                <input type="text" id="captcha" placeholder="输入收到的验证码" required>
                <!-- 添加一个发送验证码的按钮 -->
                <button type="button" onclick="sendCaptcha()">获取验证码</button>
            </div>
            <button type="submit">登录</button>
            <p>没有账号？<a href="#">注册</a></p>
        </form>
    </div>

    <script>
        function sendCaptcha() {
            // 这里应调用实际的发送验证码API，例如通过Ajax请求
            alert('验证码已发送，请查收短信');
        }
    </script>
</body>
</html>